import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/index/models/historical_expenditure_entity.dart';

HistoricalExpenditureEntity $HistoricalExpenditureEntityFromJson(
    Map<String, dynamic> json) {
  final HistoricalExpenditureEntity idEntity = HistoricalExpenditureEntity();
  final String? pay_cert_id =
      jsonConvert.convert<String>(json['pay_cert_id']);
  if (pay_cert_id != null) {
    idEntity.pay_cert_id = pay_cert_id;
  }
  final String? fund_type_code =
      jsonConvert.convert<String>(json['fund_type_code']);
  if (fund_type_code != null) {
    idEntity.fund_type_code = fund_type_code;
  }
  final String? fund_type_name =
      jsonConvert.convert<String>(json['fund_type_name']);
  if (fund_type_name != null) {
    idEntity.fund_type_name = fund_type_name;
  }
  final String? fiscal_year =
      jsonConvert.convert<String>(json['fiscal_year']);
  if (fiscal_year != null) {
    idEntity.fiscal_year = fiscal_year;
  }
  final String? vou_date = jsonConvert.convert<String>(json['vou_date']);
  if (vou_date != null) {
    idEntity.vou_date = vou_date;
  }
  final String? pay_cert_no = jsonConvert.convert<String>(json['pay_cert_no']);
  if (pay_cert_no != null) {
    idEntity.pay_cert_no = pay_cert_no;
  }
  final String? exp_func_code = jsonConvert.convert<String>(json['exp_func_code']);
  if (exp_func_code != null) {
    idEntity.exp_func_code = exp_func_code;
  }
  final String? pay_acct_no = jsonConvert.convert<String>(json['pay_acct_no']);
  if (pay_acct_no != null) {
    idEntity.pay_acct_no = pay_acct_no;
  }
  final String? pay_acct_bank_name = jsonConvert.convert<String>(json['pay_acct_bank_name']);
  if (pay_acct_bank_name != null) {
    idEntity.pay_acct_bank_name = pay_acct_bank_name;
  }
  final String? payee_acct_name = jsonConvert.convert<String>(json['payee_acct_name']);
  if (payee_acct_name != null) {
    idEntity.payee_acct_name = payee_acct_name;
  }
  final String? payee_acct_no = jsonConvert.convert<String>(json['payee_acct_no']);
  if (payee_acct_no != null) {
    idEntity.payee_acct_no = payee_acct_no;
  }
  final String? payee_acct_bank_name = jsonConvert.convert<String>(json['payee_acct_bank_name']);
  if (payee_acct_bank_name != null) {
    idEntity.payee_acct_bank_name = payee_acct_bank_name;
  }
  final String? pay_amt = jsonConvert.convert<String>(json['pay_amt']);
  if (pay_amt != null) {
    idEntity.pay_amt = pay_amt;
  }
  final String? lqd_quota_notice_no = jsonConvert.convert<String>(json['lqd_quota_notice_no']);
  if (lqd_quota_notice_no != null) {
    idEntity.lqd_quota_notice_no = lqd_quota_notice_no;
  }
  final String? pay_cert_sum_no = jsonConvert.convert<String>(json['pay_cert_sum_no']);
  if (pay_cert_sum_no != null) {
    idEntity.pay_cert_sum_no = pay_cert_sum_no;
  }
  final String? exp_func_name = jsonConvert.convert<String>(json['exp_func_name']);
  if (exp_func_name != null) {
    idEntity.exp_func_name = exp_func_name;
  }
  final String? gov_bgt_eco_code = jsonConvert.convert<String>(json['gov_bgt_eco_code']);
  if (gov_bgt_eco_code != null) {
    idEntity.gov_bgt_eco_code = gov_bgt_eco_code;
  }
  final String? gov_bgt_eco_name = jsonConvert.convert<String>(json['gov_bgt_eco_name']);
  if (gov_bgt_eco_name != null) {
    idEntity.gov_bgt_eco_name = gov_bgt_eco_name;
  }
  final String? dep_bgt_eco_code = jsonConvert.convert<String>(json['dep_bgt_eco_code']);
  if (dep_bgt_eco_code != null) {
    idEntity.dep_bgt_eco_code = dep_bgt_eco_code;
  }
  final String? dep_bgt_eco_name = jsonConvert.convert<String>(json['dep_bgt_eco_name']);
  if (dep_bgt_eco_name != null) {
    idEntity.dep_bgt_eco_name = dep_bgt_eco_name;
  }
  final String? agent_business_no = jsonConvert.convert<String>(json['agent_business_no']);
  if (agent_business_no != null) {
    idEntity.agent_business_no = agent_business_no;
  }
  final String? xpay_amt = jsonConvert.convert<String>(json['xpay_amt']);
  if (xpay_amt != null) {
    idEntity.xpay_amt = xpay_amt;
  }
  final String? xpay_date = jsonConvert.convert<String>(json['xpay_date']);
  if (xpay_date != null) {
    idEntity.xpay_date = xpay_date;
  }
  final String? agency_code = jsonConvert.convert<String>(json['agency_code']);
  if (agency_code != null) {
    idEntity.agency_code = agency_code;
  }
  final String? agency_name = jsonConvert.convert<String>(json['agency_name']);
  if (agency_name != null) {
    idEntity.agency_name = agency_name;
  }
  final String? use_des = jsonConvert.convert<String>(json['use_des']);
  if (use_des != null) {
    idEntity.use_des = use_des;
  }
  final String? set_mode_code = jsonConvert.convert<String>(json['set_mode_code']);
  if (set_mode_code != null) {
    idEntity.set_mode_code = set_mode_code;
  }
  final String? set_mode_name = jsonConvert.convert<String>(json['set_mode_name']);
  if (set_mode_name != null) {
    idEntity.set_mode_name = set_mode_name;
  }
  final String? pro_code = jsonConvert.convert<String>(json['pro_code']);
  if (pro_code != null) {
    idEntity.pro_code = pro_code;
  }
  final String? pro_name = jsonConvert.convert<String>(json['pro_name']);
  if (pro_name != null) {
    idEntity.pro_name = pro_name;
  }
  final String? mof_div_code = jsonConvert.convert<String>(json['mof_div_code']);
  if (mof_div_code != null) {
    idEntity.mof_div_code = mof_div_code;
  }
  final String? mof_div_name = jsonConvert.convert<String>(json['mof_div_name']);
  if (mof_div_name != null) {
    idEntity.mof_div_name = mof_div_name;
  }
  final String? foreign_amt = jsonConvert.convert<String>(json['foreign_amt']);
  if (foreign_amt != null) {
    idEntity.foreign_amt = foreign_amt;
  }
  final String? currency_code = jsonConvert.convert<String>(json['currency_code']);
  if (currency_code != null) {
    idEntity.currency_code = currency_code;
  }
  final String? currency_name = jsonConvert.convert<String>(json['currency_name']);
  if (currency_name != null) {
    idEntity.currency_name = currency_name;
  }
  final String? est_rat = jsonConvert.convert<String>(json['est_rat']);
  if (est_rat != null) {
    idEntity.est_rat = est_rat;
  }
  final String? receiver_code = jsonConvert.convert<String>(json['receiver_code']);
  if (receiver_code != null) {
    idEntity.receiver_code = receiver_code;
  }
  final String? receipt_add_word = jsonConvert.convert<String>(json['receipt_add_word']);
  if (receipt_add_word != null) {
    idEntity.receipt_add_word = receipt_add_word;
  }
  final String? xpayee_acct_name = jsonConvert.convert<String>(json['xpayee_acct_name']);
  if (xpayee_acct_name != null) {
    idEntity.xpayee_acct_name = xpayee_acct_name;
  }
  final String? xpayee_acct_no = jsonConvert.convert<String>(json['xpayee_acct_no']);
  if (xpayee_acct_no != null) {
    idEntity.xpayee_acct_no = xpayee_acct_no;
  }
  final String? xpayee_acct_bank_name = jsonConvert.convert<String>(json['xpayee_acct_bank_name']);
  if (xpayee_acct_bank_name != null) {
    idEntity.xpayee_acct_bank_name = xpayee_acct_bank_name;
  }
  final String? update_time = jsonConvert.convert<String>(json['update_time']);
  if (update_time != null) {
    idEntity.update_time = update_time;
  }
  final String? is_deleted = jsonConvert.convert<String>(json['is_deleted']);
  if (is_deleted != null) {
    idEntity.is_deleted = is_deleted;
  }
  final String? create_time = jsonConvert.convert<String>(json['create_time']);
  if (create_time != null) {
    idEntity.create_time = create_time;
  }
  return idEntity;
}
Map<String, dynamic> $HistoricalExpenditureEntityToJson(
    HistoricalExpenditureEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['pay_cert_id'] = entity.pay_cert_id;
  data['fund_type_code'] = entity.fund_type_code;
  data['fund_type_name'] = entity.fund_type_name;
  data['fiscal_year'] = entity.fiscal_year;
  data['vou_date'] = entity.vou_date;
  data['pay_cert_no'] = entity.pay_cert_no;
  data['pay_acct_no'] = entity.pay_acct_no;
  data['pay_acct_bank_name'] = entity.pay_acct_bank_name;
  data['payee_acct_name'] = entity.payee_acct_name;
  data['payee_acct_no'] = entity.payee_acct_no;
  data['payee_acct_bank_name'] = entity.payee_acct_bank_name;
  data['pay_amt'] = entity.pay_amt;
  data['lqd_quota_notice_no'] = entity.lqd_quota_notice_no;
  data['pay_cert_sum_no'] = entity.pay_cert_sum_no;
  data['exp_func_code'] = entity.exp_func_code;
  data['exp_func_name'] = entity.exp_func_name;
  data['gov_bgt_eco_code'] = entity.gov_bgt_eco_code;
  data['gov_bgt_eco_name'] = entity.gov_bgt_eco_name;
  data['dep_bgt_eco_code'] = entity.dep_bgt_eco_code;
  data['dep_bgt_eco_name'] = entity.dep_bgt_eco_name;
  data['agent_business_no'] = entity.agent_business_no;
  data['xpay_amt'] = entity.xpay_amt;
  data['xpay_date'] = entity.xpay_date;
  data['agency_code'] = entity.agency_code;
  data['agency_name'] = entity.agency_name;
  data['use_des'] = entity.use_des;
  data['set_mode_code'] = entity.set_mode_code;
  data['set_mode_name'] = entity.set_mode_name;
  data['pro_code'] = entity.pro_code;
  data['pro_name'] = entity.pro_name;
  data['mof_div_code'] = entity.mof_div_code;
  data['mof_div_name'] = entity.mof_div_name;
  data['foreign_amt'] = entity.foreign_amt;
  data['currency_code'] = entity.currency_code;
  data['currency_name'] = entity.currency_name;
  data['est_rat'] = entity.est_rat;
  data['receiver_code'] = entity.receiver_code;
  data['receipt_add_word'] = entity.receipt_add_word;
  data['xpayee_acct_name'] = entity.xpayee_acct_name;
  data['xpayee_acct_no'] = entity.xpayee_acct_no;
  data['xpayee_acct_bank_name'] = entity.xpayee_acct_bank_name;
  data['update_time'] = entity.update_time;
  data['is_deleted'] = entity.is_deleted;
  data['create_time'] = entity.create_time;

  return data;
}


HistoricalExpenditurePageEntity $HistoricalExpenditurePageEntityFromJson(
    Map<String, dynamic> json) {
  final HistoricalExpenditurePageEntity pageEntity = HistoricalExpenditurePageEntity();
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    pageEntity.total = total;
  }
  final int? size = jsonConvert.convert<int>(json['size']);
  if (size != null) {
    pageEntity.size = size;
  }
  final int? current = jsonConvert.convert<int>(json['current']);
  if (current != null) {
    pageEntity.current = current;
  }
  final int? pages = jsonConvert.convert<int>(json['pages']);
  if (pages != null) {
    pageEntity.pages = pages;
  }
  final List<HistoricalExpenditureEntity>? records =
      jsonConvert.convert<List<HistoricalExpenditureEntity>>(json['records']);
  if (records != null) {
    pageEntity.records = records;
  }
  return pageEntity;
}

Map<String, dynamic> $HistoricalExpenditurePageEntityToJson(
    HistoricalExpenditurePageEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['total'] = entity.total;
  data['size'] = entity.size;
  data['current'] = entity.current;
  data['records'] = entity.records;
  data['pages'] = entity.pages;
  return data;
}
